package com.neusoft.feign;

import com.neusoft.po.Cart;
import com.neusoft.po.CommonResult;
import com.neusoft.po.Redenv;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

//指定调用的微服务名
@FeignClient(name="redenv-server",fallback=RedenvFeignClientCallBack.class)
public interface RedenvFeignClient {
    /*@RequestMapping("/listCart")
    public CommonResult<List> listCart(Cart cart);

    @RequestMapping("/clearCart")
    public CommonResult<Integer> clearCart(Cart cart);*/

    @PutMapping("/RedenvController/useRedenvByRedenvId")
    CommonResult<Integer> useRedenvByRedenvId(@RequestParam("redenvId") Integer redenvId);

    @GetMapping("/RedenvController/getRedenvByRedenvId")
    public CommonResult<Redenv> getRedenvByRedenvId(@RequestParam("redenvId") Integer redenvId);
}